package logic

import (
	"context"
	"me/123/common/proto/user"
	"me/123/service/server"
)

type UserServer struct {
	user.UnimplementedUserServer
}

func (u UserServer) Login(ctx context.Context, in *user.LoginRequest) (*user.LoginResponse, error) {
	login, err := server.Login(in)
	if err != nil {
		return nil, err
	}
	return login, nil
}

func (u UserServer) CollectVoucher(ctx context.Context, in *user.CollectVoucherRequest) (*user.CollectVoucherResponse, error) {
	login, err := server.CollectVoucher(in)
	if err != nil {
		return nil, err
	}
	return login, nil
}
